/* 全局样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

/* 搜索栏样式 */
.search-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #f8f9fa;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px 50px 10px 20px;
}

#search-box {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

/* 遮罩层样式 */
#search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

#search-results {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 80%;
    max-height: 80%;
    overflow-y: auto;
}

/* 搜索结果项样式 */
.search-result-item {
    margin-bottom: 10px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.search-result-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
}

.search-result-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

.search-result-link:hover {
    text-decoration: underline;
}

/* 容器样式 */
.main-container {
    display: flex; /* 使用 Flexbox 布局 */
    padding-top: 20px; /* 为搜索栏留出空间 */
    min-height: 100vh; /* 确保容器占满整个视口高度 */
}

/* 主内容区域样式 */
.main-content {
    flex: 1; /* 占据剩余空间 */
    padding: 20px;
    background-color: #f9f9f9;
}

.parent-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #007BFF;
    padding-bottom: 10px;
}

/* 分组容器 */
.group-level-0 {
    margin-bottom: 20px; /* 减少大标题的底部间距 */
}

.group-level-1 {
    margin-left: 20px;
    margin-bottom: 15px; /* 减少子标题的底部间距 */
}

.group-level-2 {
    margin-left: 40px;
    margin-bottom: 10px; /* 减少子标题的底部间距 */
}

.group-level-3 {
    margin-left: 60px;
    margin-bottom: 5px; /* 减少子标题的底部间距 */
}

/* 分组标题 */
.group-title h1 {
    font-size: 28px;
    color: #333;
    border-left: 5px solid #007BFF;
    padding-left: 10px;
    margin-bottom: 10px; /* 减少大标题的底部间距 */
}

.group-title h2 {
    font-size: 24px;
    color: #444;
    border-left: 4px solid #007BFF;
    padding-left: 10px;
    margin-bottom: 8px; /* 减少子标题的底部间距 */
}

.group-title h3 {
    font-size: 20px;
    color: #555;
    border-left: 3px solid #007BFF;
    padding-left: 10px;
    margin-bottom: 6px; /* 减少子标题的底部间距 */
}

.group-title h4 {
    font-size: 18px;
    color: #666;
    border-left: 2px solid #007BFF;
    padding-left: 10px;
    margin-bottom: 4px; /* 减少子标题的底部间距 */
}

/* 卡片容器 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 10px; /* 减少卡片容器的顶部间距 */
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-title {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.card-button {
    margin-top: 10px;
    display: inline-block;
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.card-button:hover {
    background-color: #0056b3;
}